import Vue from "vue";
import App from "./App.vue";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import axios from "axios";
import router from "./router";
import store from "./store";
import animated from "animate.css";

Vue.config.productionTip = false;
Vue.use(animated);
Vue.use(ElementUI);
Vue.prototype.$axios = axios;

axios.default.baseURL = "api";
//设置请求头
axios.interceptors.request.use((config) => {
  config.headers.Authorization = window.sessionStorage.getItem("token");
  return config;
});


axios.defaults.headers.post["Content-Type"] = "application/json; charset=utf-8";

new Vue({
  store,
  router,
  render: (h) => h(App),
}).$mount("#app");
